package com.wyw.design.model.learning.structure.decorators;

/**
 * @Title       装饰器模式测试类
 * @Description 测试装饰器模式
 * @Author Mr Wu yewen.wu.china@gmail.com
 * @Date 2023/3/29 11:16
 * Update History:
 * Author        Time            Content
 */
public class DecoratorsTest {
    public static void main(String[] args) {
        MediaPlay mediaPlay = new VideoPlay("射雕英雄传", "郭靖大战欧阳锋");
        MediaPlay mediaPlay1 = new BarrageRedVideoPlay(mediaPlay);
        mediaPlay.play(); // 不加装饰时
        mediaPlay1.play(); // 添加弹幕装饰时
    }
}
